package org.cloud.controller;

import jakarta.annotation.Resource;
import org.cloud.model.entity.PayOrder;
import org.cloud.response.ResultData;
import org.cloud.service.IPayOrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: PayOrderController
 * Package: org.cloud.controller
 * Description:
 *
 * @Author: @weixueshi
 * @Create: 2024/4/15 - 21:26
 * @Version: v1.0
 */
@RestController
public class PayOrderController {
    @Resource
    private IPayOrderService orderService;

    /**
     * 创建订单
     */
    @GetMapping("/order/create")
    public ResultData create(PayOrder order)
    {
        orderService.create(order);
        return ResultData.success(order);
    }

    @GetMapping("/test")
    public ResultData test(){
        return ResultData.success("草您吗");
    }
}
